package erwiki.part.rendering.internal.parser;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;

public class MarkupParserPreferencePage extends FieldEditorPreferencePage {

	private static final long serialVersionUID = 1L;

	/**
	 * Create the preference page.
	 */
	public MarkupParserPreferencePage() {
		super(FLAT);
	}

	/**
	 * Create contents of the preference page.
	 */
	@Override
	protected void createFieldEditors() {
		// Create the field editors
		addField(new BooleanFieldEditor(JSPWikiMarkupParser.Prefs.USE_OUTLINK_IMAGE,
				"Add ovarlay for external link images", BooleanFieldEditor.DEFAULT, getFieldEditorParent()));

		addField(new BooleanFieldEditor(JSPWikiMarkupParser.Prefs.USE_ATTACHMENT_IMAGE, "Use attachment image",
				BooleanFieldEditor.DEFAULT, getFieldEditorParent()));

		addField(new BooleanFieldEditor(JSPWikiMarkupParser.Prefs.ALLOW_RAW_HTML, "Allows raw HTML",
				BooleanFieldEditor.DEFAULT, getFieldEditorParent()));

		addField(new BooleanFieldEditor(JSPWikiMarkupParser.Prefs.USE_REL_NOFOLLOW,
				"Mark external links as 'rel=\"nofollow\"'", BooleanFieldEditor.DEFAULT, getFieldEditorParent()));

		addField(new StringFieldEditor(JSPWikiMarkupParser.Prefs.NODE_INLINE_PATTERNS, "Inline image patterns", -1,
				StringFieldEditor.VALIDATE_ON_KEY_STROKE, getFieldEditorParent()));
	}

}
